<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2016/11/7
  Time: 16:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/mb/jsp/common.jsp" %>
<%@ page import="com.limao.servlet.WebFunction" %>
<%@ page import="com.limao.DBDataClass.CrowdUserAuthClass" %>
<%@ page import="com.wsu.search.tools.Tools" %>
<%
 //取得url带过来的参数
    String studyid = Tools.RmNull(request.getParameter("studyid"));
 %>

<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>新手学堂-详情</title>

    <script src="mb/js/jquery.qrcode.js"></script>
    <script src="mb/js/utf.js"></script>

</head>
<body ontouchstart="">
<div class="detailTop pf w100 of">
    <div class="w100 of tc cf f18">
        <span class="pa" style="left: 2px;" onclick="javascript:history.back();"><img src="mb/images/top_back_white.png" style="margin-top: 4px;height: 40px;width: 40px;"/></span>
		  详情
    </div>
</div>

<div class="container db jz mgt45" style="overflow: visible;">
  <section class="personalAllInfo w100 pr withdrawBack" style="height:192px">
        <div class="pa w100" style="top: 46px;left:0;width:100%;">
        	<div class="w95 jz of bcf br4 pdt10 pdb10">
        		<div id="listContainer" class="w95 jz mgt10 mgb10">
	        		
        		</div>
        		
        	</div>
       </div>
    </section>
</div>

<script type="text/javascript" src="mb/js/Base64.js"></script>
<script>

  $(document).ready(function(){
	
		getData();
	  
	});


//加载新数据
    function getData() {
        $.ajax({
            url: "LoginServlet",
            data: JSON.stringify({m: 105,studyid:<%=studyid%>}),
            type: 'post',
            dataType: 'json',
            contentType: "application/json;charset=utf-8",
            beforeSend: function () {
                showProgressDg();
            },
            success: function (data) {
               if (data.state == 1) {
                  showData(data.obj);
                } else {
                    // 其他错误弹出提示
                    showToast(data.info);
                }
            },
            error: function (data) {
                showToast(data.info);
            },
            complete: function () {
                closeProgressDg();
            }
        });
    }
    
    function showData(obj)
    {
    	var b = new Base64();
     	 var studycontent = b.decode(obj.studycontent);
     	
    	var htmlStr ='<div class="flexCenter">'+
	        			'<span class="db" style="width:18px;height:3px;background:#5059f6"></span>'+
	        			'<h4 class="f16 tc mgl3" style="color:#5059f6;">'+obj.studytitle+'</h4>'+
	        			'<span class="db mgl3" style="width:18px;height:3px;background:#5059f6"></span>'+
	        		'</div>'+
	        		'<div class="mgt10">'+
	        			'<iframe src="mb/jsp/showBase64.jsp?studyid='+obj.studyid+'&m=105" class="w100 db of"  frameborder="0" scrolling="no"  vsspace="0" hspace="0" marginwidth="0" marginheight="0">'+
	        				
	        			'</iframe>'+
	        		'</div>';
    	
    	 $("#listContainer").html(htmlStr);
    	 
    } 

</script>

</body>
</html>
